from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QWidget

import sys

class MyWindow(QMainWindow):
    def __init__(self) -> None:
        super().__init__()
        self.setWindowTitle("MyWindow")
        button = QPushButton("Press me")

        self.setCentralWidget(button)

if __name__ == '__main__':
    app = QApplication(sys.argv)

    window = MyWindow()
    window.show()

    app.exec()